/*******************************************
 * Copyright 2007 Aphrodite Framework for javaME .
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the GNU Public License v2.0
 * which accompanies this distribution, and is available at
 * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
 * Email : owner@aphroditeme.dev.java.net
 * Contributors:
 *     Kent Elton - initial API and implementation
 *******************************************/

package com.aphrodite.ui.bg;

import javax.microedition.lcdui.Graphics;

/**
 * Background for widgets,canvases
 * <p>
 * The width and height of the background need to set using the mutators
 * </p>
 * 
 * @author kentelt
 * 
 */
public abstract class Background {

	protected int height;
	protected int width;
	protected int x;
	protected int y;

	// protected boolean isWidgetBG = true;

	/**
	 * 
	 * @param x
	 * @param y
	 * @param width
	 * @param height
	 * @param isWidget
	 *            is this background used for a widget
	 */
	protected Background() {
	// this.x = x;
	// this.y = y;
	// this.width = width;
	// this.height = height;
	// this.isWidgetBG = isWidget;
	}

	public abstract void render(Graphics g);

	public void resize(int width, int height) {
		this.width = width;
		this.height = height;
	}

	public void setBounds(int x, int y, int width, int height) {
		this.x = x;
		this.y = y;
		this.width = width;
		this.height = height;
	}

	public void setHeight(int height) {
		this.height = height;
	}

	public void setWidth(int width) {
		this.width = width;
	}

	public void setX(int x) {
		this.x = x;

	}

	public void setY(int y) {
		this.y = y;
	}
}
